package com.kjsdfgk.hjmdsf.livev2.mvp.contract;

import com.jess.arms.mvp.IView;
import com.jess.arms.mvp.IModel;
import com.kjsdfgk.hjmdsf.app.entity.Account;
import com.kjsdfgk.hjmdsf.app.entity.AccountJson;
import com.kjsdfgk.hjmdsf.app.entity.RegJson;
import com.kjsdfgk.hjmdsf.live.mvp.bean.PingtaiBean;
import com.kjsdfgk.hjmdsf.live.mvp.bean.ResultLive;
import com.kjsdfgk.hjmdsf.live.mvp.bean.VersionEntity;
import com.tbruyelle.rxpermissions2.RxPermissions;

import java.util.List;

import cn.leancloud.AVUser;
import io.reactivex.Observable;


/**
 * ================================================
 * Description:
 * <p>
 * Created by MVPArmsTemplate on 04/13/2020 12:47
 * <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
 * <a href="https://github.com/JessYanCoding">Follow me</a>
 * <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
 * <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
 * <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
 * ================================================
 */
public interface LiveV2Contract {
    interface View extends IView {

        void showPingTaiJson(List<PingtaiBean> pingtai);

        void showNewVersion(VersionEntity versionEntity);

        void showAccount(AVUser user);


        void showAccount(Account info);

        RxPermissions getRxPermissions();

        void showLoginDlg();

        void showInitView();
    }

    //Model层定义接口,外部只需关心Model返回的数据,无需关心内部细节,即是否使用缓存
    interface Model extends IModel {
        Observable<ResultLive> getPingTaiJson( );

        Observable<VersionEntity> checkVersion( );

        Observable<RegJson> userReg(String user , String password);

        Observable<AccountJson> userLogon(String account, String password);
    }
}
